<template>
  <div class="about">
    <CodeCard></CodeCard>

    <div class="content">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="关于我" name="first">
          <markdown-it-vue class="md-body" :content="md1" />
        </el-tab-pane>
        <el-tab-pane label="关于网站" name="second">
          <markdown-it-vue class="md-body" :content="md2" />
        </el-tab-pane>
        <el-tab-pane label="关于未来 / 计划" name="third">
          <markdown-it-vue class="md-body" :content="md3" />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import fetch from 'axios'
import CodeCard from '@/views/components/CodeCard'

export default {
  name: 'About',
  components: {
    CodeCard,
  },
  data() {
    return {
      activeName: 'first',
      md1: '',
      md2: '',
      md3: '',
    }
  },
  mounted() {
    fetch.get('./md/关于我.md').then((res) => {
      this.md1 = res.data
    })
    fetch.get('./md/关于网站.md').then((res) => {
      this.md2 = res.data
    })
    fetch.get('./md/关于未来.md').then((res) => {
      this.md3 = res.data
    })
  },
  methods:{
    handleClick(){

    }
  }
}
</script>

<style scoped lang="scss">
.about {
  margin-bottom: 180px;
}

.content {
  margin: auto;
  margin-top: 120px;
  width: 1200px;
}


@media screen and (max-width: 1200px) {
  .content {
    width: 100%;
  }
  .rotate-box {
    width: 100%;
  }
}
</style>